Skip to main content

Overview NQE Library

The NQE Library allows you to organize your queries and verifications in any form you like. Think about folders that indicate the place in the network, the role or specific use-cases.

The Forward Library is a read-only section of the library that contains the queries and verifications that

are shared with the organization. The Org Repository is a writable section of the library that contains the queries and verifications that are specific to the organization.

Estimated Completion Time

20 minutes

NQE Library Suggestions

NQE Library makes no assumptions about the structure of your queries. It is up to you to organize your queries in any way that makes sense to you. Here are some suggested folder names and descriptions

FolderDescription
UsersUsers directory is TLD for all users in the platform to store their NQE queries.
DecoratorsQueries associated with generating UI Decorators
LibraryThis folder provides useful library routines that encourage code reuse.
TemplatesUseful for sharing global pattern matching templates
StagingA directory to promote queries for review and testing
VerificationsQueries associated with Verify
ReportsQueries associated with Inventory+ reports
APIQueries associated with programmatic access to external systems
IntegrationsUsed for storing external data in NQE data types.
SyntheticsUsed to store any queries uses for managing Synthetic Devices

Exercise 1: Access the NQE Library application under NQE.

nqe-library-01

Exercise 2: Create your own directory under Users.

  1. Select Users folder and click the three-dots (kebab). Select Create Directory and add your name

    nqe-library-02

  2. Create your first query, under your User directory

    In this exercise we will create a new query using the NQE Data Model as a reference

  3. : Create a query called GetInterfaces

    Select the three-dots (kebab) and select Create Query

    nqe-library-03

    nqe-library-04

  4. Add the GetInterfaces name into the dialog and click Save

    nqe-library-05

  5. We now have our NQE IDE ready to write our query and the full NQE data model explorer on the right

    nqe-library-06

  6. Over in the Data Model view, search for links.

    nqe-library-07

  7. Hover over the links in the data model to expose the hover box and then click the copy icon to copy the example

    nqe-library-08

  8. Paste the contents in your new query and Execute to see the results

    nqe-library-09

    info

    The Links attribute specifies the physical link between devices. see PhysicalLink

Exercise 3: Save and commit query to NQE Library

note

The query is now just a DRAFT and only visibly by the creator.

  1. Select the checkbox [ ] on the left of the query name to add to commit. Up at the top of the navigated select Commit ICON to commit query to version control.

    nqe-library-10

  2. Commit file to Library

    nqe-library-11

Key Takeaways

  • Flexible Organization: The NQE Library's structure supports a flexible organization of queries and verifications, allowing users to categorize them based on network location, role, or specific use cases, enhancing findability and usability.
  • Dual Library Sections: Understanding the distinction between the Read-Only Forward Library and the writable Org Repository is crucial for navigating and utilizing the NQE Library effectively.
  • User-Centric Customization: The ability to create personal directories under the Users folder enables a tailored approach to query and verification management, promoting user-centric customization and organization.
  • Query Creation and Execution: The process of creating and executing queries, from naming and writing the query using the NQE Data Model to executing and viewing results, demonstrates the library's comprehensive support for network query engineering.
  • Version Control Integration: The integration of version control mechanisms for committing queries highlights the library's role in facilitating collaborative development and maintaining a history of changes, ensuring that queries can be managed and tracked over time.
  • Practical Application of Data Model: The exercises underscore the practical application of the NQE Data Model in crafting queries, emphasizing the importance of understanding network data structures and relationships.
  • Draft to Commit Transition: The workflow from creating a query as a draft to committing it to the library encapsulates the lifecycle of query development within the NQE Library, underscoring the importance of version control in the query development process.

Resources

NQE Library